package com.situ.water_BE.controller;


import com.situ.util.getBeOrderNo;
import com.situ.water_BE.pojo.BeOrderuser;
import com.situ.water_BE.service.BeOrderuserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Angel
 * @since 2020-12-01
 */
@RestController
@RequestMapping("/be-orderuser")
public class BeOrderuserController { //工单用户详情
    @Autowired
    private BeOrderuserService beOrderuserService;

    @GetMapping("/queryId")
    public List<BeOrderuser> queryId(String id){
        List<BeOrderuser> beOrderuser = beOrderuserService.queryId(id);
        return beOrderuser;
    }
    @GetMapping("/be_contractFormQueryId")
    public List<BeOrderuser> be_contractFormQueryId(String orderNo){
        System.out.println(orderNo);
        return beOrderuserService.queryId(orderNo);
    }
    @GetMapping("/be_workingFormQueryId")
    public List<BeOrderuser> be__workingFormQueryId(String orderNo){
        System.out.println(orderNo);
        return beOrderuserService.queryId(orderNo);
    }

    @GetMapping("/getContractNum")
    public String getContractNum(){
        return getBeOrderNo.getContractNum(beOrderuserService.queryContractNum());
    }
}

